﻿using System;

namespace CyberConnect.Insteon.Messaging
{
    /// <summary>
    /// Event Arguments used for an DeviceMessage event
    /// </summary>
    [System.ComponentModel.ImmutableObject(true)]
    public class DeviceMessageEventArgs : EventArgs
    {
        private readonly DeviceMessageIncoming _IncomingMessage;

        /// <summary>
        /// The DeviceMessage of which the event is referring.
        /// </summary>
        public DeviceMessageIncoming IncomingMessage { get { return _IncomingMessage; } }

        /// <summary>
        /// Initializes DeviceMessageEventArgs with a DeviceMessage as the message.
        /// </summary>
        /// <param name="message">DeviceMessage to which the event is referring.</param>
        public DeviceMessageEventArgs(DeviceMessageIncoming message)
        {
            this._IncomingMessage = message;
        }
    }
}